package com.ytc.content.controller;

import com.ytc.commons.model.vo.ResponseResult;
import com.ytc.content.domain.CourseTeacher;
import com.ytc.content.domain.Teachplan;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ytc.content.service.CourseTeacherService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * <p>
 * 课程-教师关系表前端控制器
 * </p>

 */
@Slf4j
@RestController
@RequestMapping("/courseTeacher")
public class CourseTeacherController {

    @Autowired
    private CourseTeacherService  courseTeacherService;



    /*
    * //课程与教师计划
    * GET courseTeacher/list/63
     * 请求参数：
     *    Query参数：PageRequest
     * 响应数据：
     *    ResponseResult<CourseTeacher>
     */
     @GetMapping("/list/{courseId}")
    public ResponseResult<List<CourseTeacher>> listTeacher(@PathVariable("courseId")Long courseId){

         return courseTeacherService.listTeacher(courseId);
     }
}
